﻿#ifndef STATION_H
#define STATION_H

#include <QMetaEnum>

#include "point.h"

class Station {
  Q_GADGET
 public:
  //  enum StationFunc {
  //    FORK_UP_IF_NOT_GOAL = 1,
  //    FORK_DOWN_IF_GOAL_AND_EMPTY = 2,
  //  };
  //  Q_ENUM(StationFunc)

  enum StationType {
    NORMAL = 0,
    CAN_BE_SIMPLIFIED = 1,
  };
  Q_ENUM(StationType)

  Station();
  Station(int id, Point point, StationType type = NORMAL /*, QList<StationFunc> func = {}*/);

 public:
  int id{0};                 //工位的id
  Point point{0, 0};         //工位的坐标
  StationType type{NORMAL};  //工位的type
  //  QList<StationFunc> func{{}};  //工位的命令
};

// class Station {
//  Q_GADGET
//  enum StationInfo {
//    NORMAL = 0,
//    FORK_UP_IF_NOT_GOAL,
//    FORK_DOWN_IF_GOAL_AND_EMPTY,
//  };
//  Q_ENUM(StationInfo)
// public:
//  Station();
//  Station(int id, Point point, StationInfo info = NORMAL, double data = 0);

//  const Point &point() const;
//  void setPose(Point point);

//  int id() const;
//  void setId(int id);

//  StationInfo info() const;
//  void setStationInfo(const StationInfo &info);

//  double data() const;
//  void setData(double value);

// private:
//  int id_ = 0;                         //工位的id
//  Point pose_;                         //工位的坐标
//  StationInfo station_info_ = NORMAL;  //工位的命令
//  double data_ = 0;                    //预留位,特殊情况下可以使用,一般无用.
//};

QDebug operator<<(QDebug debug, const Station &p);

#endif  // STATION_H
